\hypertarget{mmc__hal_8h}{}\section{fatfs.\+hal/mmc\+\_\+hal.h File Reference}
\label{mmc__hal_8h}\index{fatfs.\+hal/mmc\+\_\+hal.\+h@{fatfs.\+hal/mmc\+\_\+hal.\+h}}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{mmc__hal_8h_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE}
\item 
\#define \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR}~\hyperlink{user__task_8c_ade20ba3eb51f42d2b2deb917303c9a5e}{\+\_\+\+\_\+attribute\+\_\+\+\_\+}((weak))
\item 
\#define \hyperlink{mmc__hal_8h_ae150a8179a17d87a2a72bc2d5705d835}{mmc\+\_\+cli}()~cli() /$\ast$$<$ interrupt disable $\ast$/
\item 
\#define \hyperlink{mmc__hal_8h_ae88a5c46f00c634234441978491b16fe}{mmc\+\_\+sei}()~sei() /$\ast$$<$ interrupt enable $\ast$/
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{mmc__hal_8h_a35434a6e722b07d8fee213c2256391be}{mmc\+\_\+install\+\_\+timer} (void)
\begin{DoxyCompactList}\small\item\em Install M\+MC timer task\+: \hyperlink{mmc__hal_8c_a3371d3911fed5af510a9b6e313773171}{mmc\+\_\+task()} \end{DoxyCompactList}\item 
void \hyperlink{mmc__hal_8h_aede64c733decb26d1af6f8e77628b71e}{mmc\+\_\+spi\+\_\+init} (void)
\begin{DoxyCompactList}\small\item\em M\+MC S\+PI setup and chip select. \end{DoxyCompactList}\item 
void \hyperlink{mmc__hal_8h_abdc5ab6358ed33bc5a98a11fde82b704}{mmc\+\_\+spi\+\_\+begin} (void)
\begin{DoxyCompactList}\small\item\em M\+MC S\+PI setup and chip select. \end{DoxyCompactList}\item 
void \hyperlink{mmc__hal_8h_a4963fd4e3ba8fabe799b88073aea0499}{mmc\+\_\+spi\+\_\+end} (void)
\begin{DoxyCompactList}\small\item\em M\+MC S\+PI end and chip deselect. \end{DoxyCompactList}\item 
void \hyperlink{mmc__hal_8h_a03e4e29ebb0844123378d72b41bf3575}{mmc\+\_\+slow} (void)
\begin{DoxyCompactList}\small\item\em M\+MC set slow S\+PI bus speed Only called when deselected. \end{DoxyCompactList}\item 
void \hyperlink{mmc__hal_8h_afd5747681a788dc27943f736e57eeb54}{mmc\+\_\+fast} (void)
\begin{DoxyCompactList}\small\item\em M\+MC fast S\+PI bus speed Only called when deselected. \end{DoxyCompactList}\item 
void \hyperlink{mmc__hal_8h_a850895a4f23c495249a3074fd2dafbcb}{mmc\+\_\+spi\+\_\+\+T\+X\+\_\+buffer} (const \hyperlink{send_8c_aba7bc1797add20fe3efdf37ced1182c5}{uint8\+\_\+t} $\ast$data, int count)
\begin{DoxyCompactList}\small\item\em S\+PI write buffer. \end{DoxyCompactList}\item 
void \hyperlink{mmc__hal_8h_ac5b4aae5665fe63d3d0a280215f759f8}{mmc\+\_\+spi\+\_\+\+R\+X\+\_\+buffer} (const \hyperlink{send_8c_aba7bc1797add20fe3efdf37ced1182c5}{uint8\+\_\+t} $\ast$data, int count)
\begin{DoxyCompactList}\small\item\em S\+PI read buffer. \end{DoxyCompactList}\item 
\hyperlink{send_8c_aba7bc1797add20fe3efdf37ced1182c5}{uint8\+\_\+t} \hyperlink{mmc__hal_8h_a8f6b7c1f3819cd4bd2aa114c8ebb7f19}{mmc\+\_\+spi\+\_\+\+T\+X\+RX} (\hyperlink{send_8c_aba7bc1797add20fe3efdf37ced1182c5}{uint8\+\_\+t} data)
\begin{DoxyCompactList}\small\item\em S\+PI read and write 1 byte. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{mmc__hal_8h_a95af3dbb0e5e0a16710138786c29fb4f}{mmc\+\_\+set\+\_\+ms\+\_\+timeout} (\hyperlink{send_8c_a273cf69d639a59973b6019625df33e30}{uint16\+\_\+t} ms)
\begin{DoxyCompactList}\small\item\em Set M\+MC timeout timer in Milliseconds. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{mmc__hal_8h_a852a35d5ff10bfbe64bcb06ca9a3aeb8}{mmc\+\_\+test\+\_\+timeout} (void)
\begin{DoxyCompactList}\small\item\em Wait for timeout. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{mmc__hal_8h_abb3b85d2e3abc4df68487df05510bb55}{mmc\+\_\+ms\+\_\+wait} (int ms)
\begin{DoxyCompactList}\small\item\em Wait for time in milliseconds. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{mmc__hal_8h_ad417477e66c88b40dcce683fd6a5c47a}{mmc\+\_\+init} (int verbose)
\begin{DoxyCompactList}\small\item\em Initialize M\+MC and Fat\+Fs interface, display diagnostics. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{mmc__hal_8h_a8b718faa35b9304193cd0c074b542f8a}{mmc\+\_\+power\+\_\+on} (void)
\begin{DoxyCompactList}\small\item\em M\+MC Power ON. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{mmc__hal_8h_ac9deae120e9c3b519ea62bf4c486e2ea}{mmc\+\_\+power\+\_\+off} (void)
\begin{DoxyCompactList}\small\item\em M\+MC Power O\+FF. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{mmc__hal_8h_ab9dae194babcfe774428305a575556cc}{mmc\+\_\+ins\+\_\+status} (void)
\begin{DoxyCompactList}\small\item\em M\+MC Card Inserted status. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{mmc__hal_8h_a5d4cd1450305a6f9ad8ebd1a19a606c5}{mmc\+\_\+wp\+\_\+status} (void)
\begin{DoxyCompactList}\small\item\em M\+MC Card Write Protect status. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!M\+E\+M\+S\+P\+A\+CE@{M\+E\+M\+S\+P\+A\+CE}}
\index{M\+E\+M\+S\+P\+A\+CE@{M\+E\+M\+S\+P\+A\+CE}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{M\+E\+M\+S\+P\+A\+CE}{MEMSPACE}}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\+E\+M\+S\+P\+A\+CE}\hypertarget{mmc__hal_8h_ad0fe97585b8891f5e4f2b9a6426330a4}{}\label{mmc__hal_8h_ad0fe97585b8891f5e4f2b9a6426330a4}


Definition at line 20 of file mmc\+\_\+hal.\+h.

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+cli@{mmc\+\_\+cli}}
\index{mmc\+\_\+cli@{mmc\+\_\+cli}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+cli}{mmc_cli}}]{\setlength{\rightskip}{0pt plus 5cm}\#define mmc\+\_\+cli(
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)~cli() /$\ast$$<$ interrupt disable $\ast$/}\hypertarget{mmc__hal_8h_ae150a8179a17d87a2a72bc2d5705d835}{}\label{mmc__hal_8h_ae150a8179a17d87a2a72bc2d5705d835}


Definition at line 34 of file mmc\+\_\+hal.\+h.



Referenced by mmc\+\_\+set\+\_\+ms\+\_\+timeout().

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+sei@{mmc\+\_\+sei}}
\index{mmc\+\_\+sei@{mmc\+\_\+sei}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+sei}{mmc_sei}}]{\setlength{\rightskip}{0pt plus 5cm}\#define mmc\+\_\+sei(
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)~sei() /$\ast$$<$ interrupt enable $\ast$/}\hypertarget{mmc__hal_8h_ae88a5c46f00c634234441978491b16fe}{}\label{mmc__hal_8h_ae88a5c46f00c634234441978491b16fe}


Definition at line 35 of file mmc\+\_\+hal.\+h.



Referenced by mmc\+\_\+set\+\_\+ms\+\_\+timeout().

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!W\+E\+A\+K\+\_\+\+A\+TR@{W\+E\+A\+K\+\_\+\+A\+TR}}
\index{W\+E\+A\+K\+\_\+\+A\+TR@{W\+E\+A\+K\+\_\+\+A\+TR}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{W\+E\+A\+K\+\_\+\+A\+TR}{WEAK_ATR}}]{\setlength{\rightskip}{0pt plus 5cm}\#define W\+E\+A\+K\+\_\+\+A\+TR~{\bf \+\_\+\+\_\+attribute\+\_\+\+\_\+}((weak))}\hypertarget{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{}\label{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}


Definition at line 25 of file mmc\+\_\+hal.\+h.



\subsection{Function Documentation}
\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+fast@{mmc\+\_\+fast}}
\index{mmc\+\_\+fast@{mmc\+\_\+fast}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+fast(void)}{mmc_fast(void)}}]{\setlength{\rightskip}{0pt plus 5cm}void mmc\+\_\+fast (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_afd5747681a788dc27943f736e57eeb54}{}\label{mmc__hal_8h_afd5747681a788dc27943f736e57eeb54}


M\+MC fast S\+PI bus speed Only called when deselected. 


\begin{DoxyItemize}
\item Used during normal file IO phases \begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}

\end{DoxyItemize}

Definition at line 123 of file mmc\+\_\+hal.\+c.

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+init@{mmc\+\_\+init}}
\index{mmc\+\_\+init@{mmc\+\_\+init}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+init(int verbose)}{mmc_init(int verbose)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int mmc\+\_\+init (
\begin{DoxyParamCaption}
\item[{int}]{verbose}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_ad417477e66c88b40dcce683fd6a5c47a}{}\label{mmc__hal_8h_ad417477e66c88b40dcce683fd6a5c47a}


Initialize M\+MC and Fat\+Fs interface, display diagnostics. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em verbose} & display initialisation messages \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}


Definition at line 208 of file mmc\+\_\+hal.\+c.



Referenced by fatfs\+\_\+tests(), open(), and setup().

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+ins\+\_\+status@{mmc\+\_\+ins\+\_\+status}}
\index{mmc\+\_\+ins\+\_\+status@{mmc\+\_\+ins\+\_\+status}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+ins\+\_\+status(void)}{mmc_ins_status(void)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int mmc\+\_\+ins\+\_\+status (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_ab9dae194babcfe774428305a575556cc}{}\label{mmc__hal_8h_ab9dae194babcfe774428305a575556cc}


M\+MC Card Inserted status. 


\begin{DoxyItemize}
\item We do not detect card insert status in this project. \begin{DoxyReturn}{Returns}
1 card inserted 
\end{DoxyReturn}

\end{DoxyItemize}

Definition at line 300 of file mmc\+\_\+hal.\+c.

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+install\+\_\+timer@{mmc\+\_\+install\+\_\+timer}}
\index{mmc\+\_\+install\+\_\+timer@{mmc\+\_\+install\+\_\+timer}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+install\+\_\+timer(void)}{mmc_install_timer(void)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void mmc\+\_\+install\+\_\+timer (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_a35434a6e722b07d8fee213c2256391be}{}\label{mmc__hal_8h_a35434a6e722b07d8fee213c2256391be}


Install M\+MC timer task\+: \hyperlink{mmc__hal_8c_a3371d3911fed5af510a9b6e313773171}{mmc\+\_\+task()} 

\begin{DoxySeeAlso}{See also}
\hyperlink{mmc__hal_8c_a3371d3911fed5af510a9b6e313773171}{mmc\+\_\+task()} 
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 79 of file mmc\+\_\+hal.\+c.



Referenced by mmc\+\_\+init().

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+ms\+\_\+wait@{mmc\+\_\+ms\+\_\+wait}}
\index{mmc\+\_\+ms\+\_\+wait@{mmc\+\_\+ms\+\_\+wait}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+ms\+\_\+wait(int ms)}{mmc_ms_wait(int ms)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void mmc\+\_\+ms\+\_\+wait (
\begin{DoxyParamCaption}
\item[{int}]{ms}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_abb3b85d2e3abc4df68487df05510bb55}{}\label{mmc__hal_8h_abb3b85d2e3abc4df68487df05510bb55}


Wait for time in milliseconds. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em ms} & timeout in Milliseconds \\
\hline
\end{DoxyParams}


Definition at line 194 of file mmc\+\_\+hal.\+c.

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+power\+\_\+off@{mmc\+\_\+power\+\_\+off}}
\index{mmc\+\_\+power\+\_\+off@{mmc\+\_\+power\+\_\+off}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+power\+\_\+off(void)}{mmc_power_off(void)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void mmc\+\_\+power\+\_\+off (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_ac9deae120e9c3b519ea62bf4c486e2ea}{}\label{mmc__hal_8h_ac9deae120e9c3b519ea62bf4c486e2ea}


M\+MC Power O\+FF. 

\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 290 of file mmc\+\_\+hal.\+c.



Referenced by power\+\_\+off().

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+power\+\_\+on@{mmc\+\_\+power\+\_\+on}}
\index{mmc\+\_\+power\+\_\+on@{mmc\+\_\+power\+\_\+on}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+power\+\_\+on(void)}{mmc_power_on(void)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void mmc\+\_\+power\+\_\+on (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_a8b718faa35b9304193cd0c074b542f8a}{}\label{mmc__hal_8h_a8b718faa35b9304193cd0c074b542f8a}


M\+MC Power ON. 

\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 282 of file mmc\+\_\+hal.\+c.



Referenced by power\+\_\+on().

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+set\+\_\+ms\+\_\+timeout@{mmc\+\_\+set\+\_\+ms\+\_\+timeout}}
\index{mmc\+\_\+set\+\_\+ms\+\_\+timeout@{mmc\+\_\+set\+\_\+ms\+\_\+timeout}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+set\+\_\+ms\+\_\+timeout(uint16\+\_\+t ms)}{mmc_set_ms_timeout(uint16_t ms)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void mmc\+\_\+set\+\_\+ms\+\_\+timeout (
\begin{DoxyParamCaption}
\item[{{\bf uint16\+\_\+t}}]{ms}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_a95af3dbb0e5e0a16710138786c29fb4f}{}\label{mmc__hal_8h_a95af3dbb0e5e0a16710138786c29fb4f}


Set M\+MC timeout timer in Milliseconds. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em ms} & timeout in Milliseconds \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{mmc__hal_8c_a7383533f1b6630ff4f0337f400b4b62e}{mmc\+\_\+test\+\_\+timeout} ( ) 
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 161 of file mmc\+\_\+hal.\+c.



Referenced by mmc\+\_\+disk\+\_\+initialize(), mmc\+\_\+disk\+\_\+read(), mmc\+\_\+ms\+\_\+wait(), rcvr\+\_\+datablock(), and wait\+\_\+ready().

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+slow@{mmc\+\_\+slow}}
\index{mmc\+\_\+slow@{mmc\+\_\+slow}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+slow(void)}{mmc_slow(void)}}]{\setlength{\rightskip}{0pt plus 5cm}void mmc\+\_\+slow (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_a03e4e29ebb0844123378d72b41bf3575}{}\label{mmc__hal_8h_a03e4e29ebb0844123378d72b41bf3575}


M\+MC set slow S\+PI bus speed Only called when deselected. 


\begin{DoxyItemize}
\item Used during card detect phase \begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}

\end{DoxyItemize}

Definition at line 113 of file mmc\+\_\+hal.\+c.



Referenced by mmc\+\_\+spi\+\_\+init().

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+spi\+\_\+begin@{mmc\+\_\+spi\+\_\+begin}}
\index{mmc\+\_\+spi\+\_\+begin@{mmc\+\_\+spi\+\_\+begin}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+spi\+\_\+begin(void)}{mmc_spi_begin(void)}}]{\setlength{\rightskip}{0pt plus 5cm}void mmc\+\_\+spi\+\_\+begin (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_abdc5ab6358ed33bc5a98a11fde82b704}{}\label{mmc__hal_8h_abdc5ab6358ed33bc5a98a11fde82b704}


M\+MC S\+PI setup and chip select. 

\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 97 of file mmc\+\_\+hal.\+c.

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+spi\+\_\+end@{mmc\+\_\+spi\+\_\+end}}
\index{mmc\+\_\+spi\+\_\+end@{mmc\+\_\+spi\+\_\+end}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+spi\+\_\+end(void)}{mmc_spi_end(void)}}]{\setlength{\rightskip}{0pt plus 5cm}void mmc\+\_\+spi\+\_\+end (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_a4963fd4e3ba8fabe799b88073aea0499}{}\label{mmc__hal_8h_a4963fd4e3ba8fabe799b88073aea0499}


M\+MC S\+PI end and chip deselect. 

\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 104 of file mmc\+\_\+hal.\+c.

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+spi\+\_\+init@{mmc\+\_\+spi\+\_\+init}}
\index{mmc\+\_\+spi\+\_\+init@{mmc\+\_\+spi\+\_\+init}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+spi\+\_\+init(void)}{mmc_spi_init(void)}}]{\setlength{\rightskip}{0pt plus 5cm}void mmc\+\_\+spi\+\_\+init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_aede64c733decb26d1af6f8e77628b71e}{}\label{mmc__hal_8h_aede64c733decb26d1af6f8e77628b71e}


M\+MC S\+PI setup and chip select. 

\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 88 of file mmc\+\_\+hal.\+c.



Referenced by mmc\+\_\+init().

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+spi\+\_\+\+R\+X\+\_\+buffer@{mmc\+\_\+spi\+\_\+\+R\+X\+\_\+buffer}}
\index{mmc\+\_\+spi\+\_\+\+R\+X\+\_\+buffer@{mmc\+\_\+spi\+\_\+\+R\+X\+\_\+buffer}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+spi\+\_\+\+R\+X\+\_\+buffer(const uint8\+\_\+t $\ast$data, int count)}{mmc_spi_RX_buffer(const uint8_t *data, int count)}}]{\setlength{\rightskip}{0pt plus 5cm}void mmc\+\_\+spi\+\_\+\+R\+X\+\_\+buffer (
\begin{DoxyParamCaption}
\item[{const {\bf uint8\+\_\+t} $\ast$}]{data, }
\item[{int}]{count}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_ac5b4aae5665fe63d3d0a280215f759f8}{}\label{mmc__hal_8h_ac5b4aae5665fe63d3d0a280215f759f8}


S\+PI read buffer. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em $\ast$data} & transmit buffer \\
\hline
\mbox{\tt in}  & {\em count} & number of bytes to write \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 142 of file mmc\+\_\+hal.\+c.



Referenced by rcvr\+\_\+spi\+\_\+multi().

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+spi\+\_\+\+T\+X\+\_\+buffer@{mmc\+\_\+spi\+\_\+\+T\+X\+\_\+buffer}}
\index{mmc\+\_\+spi\+\_\+\+T\+X\+\_\+buffer@{mmc\+\_\+spi\+\_\+\+T\+X\+\_\+buffer}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+spi\+\_\+\+T\+X\+\_\+buffer(const uint8\+\_\+t $\ast$data, int count)}{mmc_spi_TX_buffer(const uint8_t *data, int count)}}]{\setlength{\rightskip}{0pt plus 5cm}void mmc\+\_\+spi\+\_\+\+T\+X\+\_\+buffer (
\begin{DoxyParamCaption}
\item[{const {\bf uint8\+\_\+t} $\ast$}]{data, }
\item[{int}]{count}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_a850895a4f23c495249a3074fd2dafbcb}{}\label{mmc__hal_8h_a850895a4f23c495249a3074fd2dafbcb}


S\+PI write buffer. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em $\ast$data} & transmit buffer \\
\hline
\mbox{\tt in}  & {\em count} & number of bytes to write \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 133 of file mmc\+\_\+hal.\+c.



Referenced by xmit\+\_\+spi\+\_\+multi().

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+spi\+\_\+\+T\+X\+RX@{mmc\+\_\+spi\+\_\+\+T\+X\+RX}}
\index{mmc\+\_\+spi\+\_\+\+T\+X\+RX@{mmc\+\_\+spi\+\_\+\+T\+X\+RX}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+spi\+\_\+\+T\+X\+R\+X(uint8\+\_\+t data)}{mmc_spi_TXRX(uint8_t data)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf uint8\+\_\+t} mmc\+\_\+spi\+\_\+\+T\+X\+RX (
\begin{DoxyParamCaption}
\item[{{\bf uint8\+\_\+t}}]{data}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_a8f6b7c1f3819cd4bd2aa114c8ebb7f19}{}\label{mmc__hal_8h_a8f6b7c1f3819cd4bd2aa114c8ebb7f19}


S\+PI read and write 1 byte. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em data} & value to transmit \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
uint8\+\_\+t value read 
\end{DoxyReturn}


Definition at line 150 of file mmc\+\_\+hal.\+c.



Referenced by xchg\+\_\+spi().

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+test\+\_\+timeout@{mmc\+\_\+test\+\_\+timeout}}
\index{mmc\+\_\+test\+\_\+timeout@{mmc\+\_\+test\+\_\+timeout}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+test\+\_\+timeout(void)}{mmc_test_timeout(void)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int mmc\+\_\+test\+\_\+timeout (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_a852a35d5ff10bfbe64bcb06ca9a3aeb8}{}\label{mmc__hal_8h_a852a35d5ff10bfbe64bcb06ca9a3aeb8}


Wait for timeout. 

\begin{DoxyReturn}{Returns}
1 ready 

0 timeout 
\end{DoxyReturn}


Definition at line 172 of file mmc\+\_\+hal.\+c.



Referenced by mmc\+\_\+disk\+\_\+initialize(), mmc\+\_\+disk\+\_\+read(), mmc\+\_\+ms\+\_\+wait(), rcvr\+\_\+datablock(), and wait\+\_\+ready().

\index{mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}!mmc\+\_\+wp\+\_\+status@{mmc\+\_\+wp\+\_\+status}}
\index{mmc\+\_\+wp\+\_\+status@{mmc\+\_\+wp\+\_\+status}!mmc\+\_\+hal.\+h@{mmc\+\_\+hal.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+wp\+\_\+status(void)}{mmc_wp_status(void)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int mmc\+\_\+wp\+\_\+status (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{mmc__hal_8h_a5d4cd1450305a6f9ad8ebd1a19a606c5}{}\label{mmc__hal_8h_a5d4cd1450305a6f9ad8ebd1a19a606c5}


M\+MC Card Write Protect status. 


\begin{DoxyItemize}
\item We do not detect card write protect status in this project. \begin{DoxyReturn}{Returns}
0 == not write protected 
\end{DoxyReturn}

\end{DoxyItemize}

Definition at line 313 of file mmc\+\_\+hal.\+c.

